home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
devel
/
vbcc-wos-src
/
ar
/
append.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-01
|
1KB
|
56 lines
/* $VER: ar append.c V0.1 (31.01.98)
*
* This file is part of ar, a portable archive maintanance
* utility for normal and BSD-style archives.
* Copyright (c) 1999 Frank Wille
*
* ar is freeware and part of the portable and retargetable ANSI C
* compiler vbcc, copyright (c) 1995-99 by Volker Barthelmann.
* ar may be freely redistributed as long as no modifications are
* made and nothing is charged for it. Non-commercial usage is allowed
* without any restrictions.
* EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
* SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
*
*
* v0.1 (31.01.99) phx
* First working version, which only supports 'q' (quick append)
* and 't' (table of contents), reads and writes normals and
* BSD-style archives. Symbol table will not be created!
* v0.0 (30.01.99) phx
* File created.
*/
#include <stdio.h>
#include "ar.h"
#include "archive.h"
void ar_move(struct Args *args)
{
}
void ar_qappend(struct Args *args)
{
struct Archive *ar;
struct ArObject *obj;
uint32 i;
if (ar = ar_readorcreate(args->arname,args->modifier)) {
for (i=0; i<args->filecnt; i++) {
if (obj = ar_newmemb(args->files[i])) {
/* quick append, without checking archive */
addtail(&ar->l,&obj->n);
ar->entries++;
if (args->modifier & AR_VERBOSE)
printf("q - %s\n",obj->name);
}
else
return;
}
ar_write(ar,args->modifier);
}
}